3.4.90 \(\int \tan (x) \sqrt {a+b \tan ^4(x)} \, dx\) [390]

Optimal. Leaf size=90 \[ -\frac {1}{2} \sqrt {b} \tanh ^{-1}\left (\frac {\sqrt {b} \tan ^2(x)}{\sqrt {a+b \tan ^4(x)}}\right )-\frac {1}{2} \sqrt {a+b} \tanh ^{-1}\left (\frac {a-b \tan ^2(x)}{\sqrt {a+b} \sqrt {a+b \tan ^4(x)}}\right )+\frac {1}{2} \sqrt {a+b \tan ^4(x)} \]

[Out]

-1/2*arctanh(b^(1/2)*tan(x)^2/(a+b*tan(x)^4)^(1/2))*b^(1/2)-1/2*arctanh((a-b*tan(x)^2)/(a+b)^(1/2)/(a+b*tan(x)
^4)^(1/2))*(a+b)^(1/2)+1/2*(a+b*tan(x)^4)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.08, antiderivative size = 90, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.467, Rules used = {3751, 1262, 749, 858, 223, 212, 739} \begin {gather*} \frac {1}{2} \sqrt {a+b \tan ^4(x)}-\frac {1}{2} \sqrt {b} \tanh ^{-1}\left (\frac {\sqrt {b} \tan ^2(x)}{\sqrt {a+b \tan ^4(x)}}\right )-\frac {1}{2} \sqrt {a+b} \tanh ^{-1}\left (\frac {a-b \tan ^2(x)}{\sqrt {a+b} \sqrt {a+b \tan ^4(x)}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Tan[x]*Sqrt[a + b*Tan[x]^4],x]

[Out]

-1/2*(Sqrt[b]*ArcTanh[(Sqrt[b]*Tan[x]^2)/Sqrt[a + b*Tan[x]^4]]) - (Sqrt[a + b]*ArcTanh[(a - b*Tan[x]^2)/(Sqrt[
a + b]*Sqrt[a + b*Tan[x]^4])])/2 + Sqrt[a + b*Tan[x]^4]/2

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 223

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 739

Int[1/(((d_) + (e_.)*(x_))*Sqrt[(a_) + (c_.)*(x_)^2]), x_Symbol] :> -Subst[Int[1/(c*d^2 + a*e^2 - x^2), x], x,
 (a*e - c*d*x)/Sqrt[a + c*x^2]] /; FreeQ[{a, c, d, e}, x]

Rule 749

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(d + e*x)^(m + 1)*((a + c*x^2)^p/(e
*(m + 2*p + 1))), x] + Dist[2*(p/(e*(m + 2*p + 1))), Int[(d + e*x)^m*Simp[a*e - c*d*x, x]*(a + c*x^2)^(p - 1),
 x], x] /; FreeQ[{a, c, d, e, m}, x] && NeQ[c*d^2 + a*e^2, 0] && GtQ[p, 0] && NeQ[m + 2*p + 1, 0] && ( !Ration
alQ[m] || LtQ[m, 1]) &&  !ILtQ[m + 2*p, 0] && IntQuadraticQ[a, 0, c, d, e, m, p, x]

Rule 858

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Dist[g/e, Int[(d
+ e*x)^(m + 1)*(a + c*x^2)^p, x], x] + Dist[(e*f - d*g)/e, Int[(d + e*x)^m*(a + c*x^2)^p, x], x] /; FreeQ[{a,
c, d, e, f, g, m, p}, x] && NeQ[c*d^2 + a*e^2, 0] &&  !IGtQ[m, 0]

Rule 1262

Int[(x_)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Dist[1/2, Subst[Int[(d + e*x)^q
*(a + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, c, d, e, p, q}, x]

Rule 3751

Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol]
 :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[c*(ff/f), Subst[Int[(d*ff*(x/c))^m*((a + b*(ff*x)^n)^p/(c^2
 + ff^2*x^2)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && (IGtQ[p, 0] || EqQ
[n, 2] || EqQ[n, 4] || (IntegerQ[p] && RationalQ[n]))

Rubi steps

\begin {align*} \int \tan (x) \sqrt {a+b \tan ^4(x)} \, dx &=\text {Subst}\left (\int \frac {x \sqrt {a+b x^4}}{1+x^2} \, dx,x,\tan (x)\right )\\ &=\frac {1}{2} \text {Subst}\left (\int \frac {\sqrt {a+b x^2}}{1+x} \, dx,x,\tan ^2(x)\right )\\ &=\frac {1}{2} \sqrt {a+b \tan ^4(x)}+\frac {1}{2} \text {Subst}\left (\int \frac {a-b x}{(1+x) \sqrt {a+b x^2}} \, dx,x,\tan ^2(x)\right )\\ &=\frac {1}{2} \sqrt {a+b \tan ^4(x)}-\frac {1}{2} b \text {Subst}\left (\int \frac {1}{\sqrt {a+b x^2}} \, dx,x,\tan ^2(x)\right )+\frac {1}{2} (a+b) \text {Subst}\left (\int \frac {1}{(1+x) \sqrt {a+b x^2}} \, dx,x,\tan ^2(x)\right )\\ &=\frac {1}{2} \sqrt {a+b \tan ^4(x)}+\frac {1}{2} (-a-b) \text {Subst}\left (\int \frac {1}{a+b-x^2} \, dx,x,\frac {a-b \tan ^2(x)}{\sqrt {a+b \tan ^4(x)}}\right )-\frac {1}{2} b \text {Subst}\left (\int \frac {1}{1-b x^2} \, dx,x,\frac {\tan ^2(x)}{\sqrt {a+b \tan ^4(x)}}\right )\\ &=-\frac {1}{2} \sqrt {b} \tanh ^{-1}\left (\frac {\sqrt {b} \tan ^2(x)}{\sqrt {a+b \tan ^4(x)}}\right )-\frac {1}{2} \sqrt {a+b} \tanh ^{-1}\left (\frac {a-b \tan ^2(x)}{\sqrt {a+b} \sqrt {a+b \tan ^4(x)}}\right )+\frac {1}{2} \sqrt {a+b \tan ^4(x)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 86, normalized size = 0.96 \begin {gather*} \frac {1}{2} \left (-\sqrt {b} \tanh ^{-1}\left (\frac {\sqrt {b} \tan ^2(x)}{\sqrt {a+b \tan ^4(x)}}\right )-\sqrt {a+b} \tanh ^{-1}\left (\frac {a-b \tan ^2(x)}{\sqrt {a+b} \sqrt {a+b \tan ^4(x)}}\right )+\sqrt {a+b \tan ^4(x)}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Tan[x]*Sqrt[a + b*Tan[x]^4],x]

[Out]

(-(Sqrt[b]*ArcTanh[(Sqrt[b]*Tan[x]^2)/Sqrt[a + b*Tan[x]^4]]) - Sqrt[a + b]*ArcTanh[(a - b*Tan[x]^2)/(Sqrt[a +
b]*Sqrt[a + b*Tan[x]^4])] + Sqrt[a + b*Tan[x]^4])/2

________________________________________________________________________________________

Maple [A]
time = 0.09, size = 139, normalized size = 1.54

method result size
derivativedivides \(\frac {\sqrt {b \left (1+\tan ^{2}\left (x \right )\right )^{2}-2 b \left (1+\tan ^{2}\left (x \right )\right )+a +b}}{2}-\frac {\sqrt {b}\, \ln \left (\frac {b \left (1+\tan ^{2}\left (x \right )\right )-b}{\sqrt {b}}+\sqrt {b \left (1+\tan ^{2}\left (x \right )\right )^{2}-2 b \left (1+\tan ^{2}\left (x \right )\right )+a +b}\right )}{2}-\frac {\sqrt {a +b}\, \ln \left (\frac {2 a +2 b -2 b \left (1+\tan ^{2}\left (x \right )\right )+2 \sqrt {a +b}\, \sqrt {b \left (1+\tan ^{2}\left (x \right )\right )^{2}-2 b \left (1+\tan ^{2}\left (x \right )\right )+a +b}}{1+\tan ^{2}\left (x \right )}\right )}{2}\) \(139\)
default \(\frac {\sqrt {b \left (1+\tan ^{2}\left (x \right )\right )^{2}-2 b \left (1+\tan ^{2}\left (x \right )\right )+a +b}}{2}-\frac {\sqrt {b}\, \ln \left (\frac {b \left (1+\tan ^{2}\left (x \right )\right )-b}{\sqrt {b}}+\sqrt {b \left (1+\tan ^{2}\left (x \right )\right )^{2}-2 b \left (1+\tan ^{2}\left (x \right )\right )+a +b}\right )}{2}-\frac {\sqrt {a +b}\, \ln \left (\frac {2 a +2 b -2 b \left (1+\tan ^{2}\left (x \right )\right )+2 \sqrt {a +b}\, \sqrt {b \left (1+\tan ^{2}\left (x \right )\right )^{2}-2 b \left (1+\tan ^{2}\left (x \right )\right )+a +b}}{1+\tan ^{2}\left (x \right )}\right )}{2}\) \(139\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*tan(x)^4)^(1/2)*tan(x),x,method=_RETURNVERBOSE)

[Out]

1/2*(b*(1+tan(x)^2)^2-2*b*(1+tan(x)^2)+a+b)^(1/2)-1/2*b^(1/2)*ln((b*(1+tan(x)^2)-b)/b^(1/2)+(b*(1+tan(x)^2)^2-
2*b*(1+tan(x)^2)+a+b)^(1/2))-1/2*(a+b)^(1/2)*ln((2*a+2*b-2*b*(1+tan(x)^2)+2*(a+b)^(1/2)*(b*(1+tan(x)^2)^2-2*b*
(1+tan(x)^2)+a+b)^(1/2))/(1+tan(x)^2))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(x)^4)^(1/2)*tan(x),x, algorithm="maxima")

[Out]

integrate(sqrt(b*tan(x)^4 + a)*tan(x), x)

________________________________________________________________________________________

Fricas [A]
time = 2.63, size = 475, normalized size = 5.28 \begin {gather*} \left [\frac {1}{4} \, \sqrt {b} \log \left (-2 \, b \tan \left (x\right )^{4} + 2 \, \sqrt {b \tan \left (x\right )^{4} + a} \sqrt {b} \tan \left (x\right )^{2} - a\right ) + \frac {1}{4} \, \sqrt {a + b} \log \left (\frac {{\left (a b + 2 \, b^{2}\right )} \tan \left (x\right )^{4} - 2 \, a b \tan \left (x\right )^{2} + 2 \, \sqrt {b \tan \left (x\right )^{4} + a} {\left (b \tan \left (x\right )^{2} - a\right )} \sqrt {a + b} + 2 \, a^{2} + a b}{\tan \left (x\right )^{4} + 2 \, \tan \left (x\right )^{2} + 1}\right ) + \frac {1}{2} \, \sqrt {b \tan \left (x\right )^{4} + a}, \frac {1}{2} \, \sqrt {-b} \arctan \left (\frac {\sqrt {b \tan \left (x\right )^{4} + a} \sqrt {-b}}{b \tan \left (x\right )^{2}}\right ) + \frac {1}{4} \, \sqrt {a + b} \log \left (\frac {{\left (a b + 2 \, b^{2}\right )} \tan \left (x\right )^{4} - 2 \, a b \tan \left (x\right )^{2} + 2 \, \sqrt {b \tan \left (x\right )^{4} + a} {\left (b \tan \left (x\right )^{2} - a\right )} \sqrt {a + b} + 2 \, a^{2} + a b}{\tan \left (x\right )^{4} + 2 \, \tan \left (x\right )^{2} + 1}\right ) + \frac {1}{2} \, \sqrt {b \tan \left (x\right )^{4} + a}, -\frac {1}{2} \, \sqrt {-a - b} \arctan \left (\frac {\sqrt {b \tan \left (x\right )^{4} + a} {\left (b \tan \left (x\right )^{2} - a\right )} \sqrt {-a - b}}{{\left (a b + b^{2}\right )} \tan \left (x\right )^{4} + a^{2} + a b}\right ) + \frac {1}{4} \, \sqrt {b} \log \left (-2 \, b \tan \left (x\right )^{4} + 2 \, \sqrt {b \tan \left (x\right )^{4} + a} \sqrt {b} \tan \left (x\right )^{2} - a\right ) + \frac {1}{2} \, \sqrt {b \tan \left (x\right )^{4} + a}, -\frac {1}{2} \, \sqrt {-a - b} \arctan \left (\frac {\sqrt {b \tan \left (x\right )^{4} + a} {\left (b \tan \left (x\right )^{2} - a\right )} \sqrt {-a - b}}{{\left (a b + b^{2}\right )} \tan \left (x\right )^{4} + a^{2} + a b}\right ) + \frac {1}{2} \, \sqrt {-b} \arctan \left (\frac {\sqrt {b \tan \left (x\right )^{4} + a} \sqrt {-b}}{b \tan \left (x\right )^{2}}\right ) + \frac {1}{2} \, \sqrt {b \tan \left (x\right )^{4} + a}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(x)^4)^(1/2)*tan(x),x, algorithm="fricas")

[Out]

[1/4*sqrt(b)*log(-2*b*tan(x)^4 + 2*sqrt(b*tan(x)^4 + a)*sqrt(b)*tan(x)^2 - a) + 1/4*sqrt(a + b)*log(((a*b + 2*
b^2)*tan(x)^4 - 2*a*b*tan(x)^2 + 2*sqrt(b*tan(x)^4 + a)*(b*tan(x)^2 - a)*sqrt(a + b) + 2*a^2 + a*b)/(tan(x)^4
+ 2*tan(x)^2 + 1)) + 1/2*sqrt(b*tan(x)^4 + a), 1/2*sqrt(-b)*arctan(sqrt(b*tan(x)^4 + a)*sqrt(-b)/(b*tan(x)^2))
 + 1/4*sqrt(a + b)*log(((a*b + 2*b^2)*tan(x)^4 - 2*a*b*tan(x)^2 + 2*sqrt(b*tan(x)^4 + a)*(b*tan(x)^2 - a)*sqrt
(a + b) + 2*a^2 + a*b)/(tan(x)^4 + 2*tan(x)^2 + 1)) + 1/2*sqrt(b*tan(x)^4 + a), -1/2*sqrt(-a - b)*arctan(sqrt(
b*tan(x)^4 + a)*(b*tan(x)^2 - a)*sqrt(-a - b)/((a*b + b^2)*tan(x)^4 + a^2 + a*b)) + 1/4*sqrt(b)*log(-2*b*tan(x
)^4 + 2*sqrt(b*tan(x)^4 + a)*sqrt(b)*tan(x)^2 - a) + 1/2*sqrt(b*tan(x)^4 + a), -1/2*sqrt(-a - b)*arctan(sqrt(b
*tan(x)^4 + a)*(b*tan(x)^2 - a)*sqrt(-a - b)/((a*b + b^2)*tan(x)^4 + a^2 + a*b)) + 1/2*sqrt(-b)*arctan(sqrt(b*
tan(x)^4 + a)*sqrt(-b)/(b*tan(x)^2)) + 1/2*sqrt(b*tan(x)^4 + a)]

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {a + b \tan ^{4}{\left (x \right )}} \tan {\left (x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(x)**4)**(1/2)*tan(x),x)

[Out]

Integral(sqrt(a + b*tan(x)**4)*tan(x), x)

________________________________________________________________________________________

Giac [A]
time = 0.45, size = 89, normalized size = 0.99 \begin {gather*} \frac {{\left (a + b\right )} \arctan \left (-\frac {\sqrt {b} \tan \left (x\right )^{2} - \sqrt {b \tan \left (x\right )^{4} + a} + \sqrt {b}}{\sqrt {-a - b}}\right )}{\sqrt {-a - b}} + \frac {1}{2} \, \sqrt {b} \log \left ({\left | -\sqrt {b} \tan \left (x\right )^{2} + \sqrt {b \tan \left (x\right )^{4} + a} \right |}\right ) + \frac {1}{2} \, \sqrt {b \tan \left (x\right )^{4} + a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(x)^4)^(1/2)*tan(x),x, algorithm="giac")

[Out]

(a + b)*arctan(-(sqrt(b)*tan(x)^2 - sqrt(b*tan(x)^4 + a) + sqrt(b))/sqrt(-a - b))/sqrt(-a - b) + 1/2*sqrt(b)*l
og(abs(-sqrt(b)*tan(x)^2 + sqrt(b*tan(x)^4 + a))) + 1/2*sqrt(b*tan(x)^4 + a)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \mathrm {tan}\left (x\right )\,\sqrt {b\,{\mathrm {tan}\left (x\right )}^4+a} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(x)*(a + b*tan(x)^4)^(1/2),x)

[Out]

int(tan(x)*(a + b*tan(x)^4)^(1/2), x)

________________________________________________________________________________________